<%@page session="true" %>
<%@page import="org.w3c.dom.Document"%>
<%
    String usuario = "";
    HttpSession sesionOk = request.getSession();
    if (sesionOk.getAttribute("usuario") == null) {
%>
<jsp:forward page="login.jsp">
    <jsp:param name="error" value="Es
               obligatorio identificarse"/>
</jsp:forward>
<%    } else {
        usuario = (String) sesionOk.getAttribute("usuario");
    }
%>
<!DOCTYPE html>
<html>
    <head>
        <title>Plataforma de Votacion</title>

        <link type="text/css" href="css/default.css" rel="stylesheet">
        <link type="text/css" href="css/style.css" rel="stylesheet">
        <link type="text/css" href="css/admin.css" rel="stylesheet">

        <script type="text/javascript" src="js/cargar_pag_div.js" ></script>
        <script type="text/javascript" src="js/md5.js"></script>

        <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css">
        <script src="http://code.jquery.com/jquery-1.8.2.js"></script>
        <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
    </head>
    <body>

        <div class="contenedor">

            <header>
                <jsp:directive.include file="header.jsp" />
            </header>
            <nav>
                <jsp:directive.include file="nav_1.jsp" />
            </nav>

            <article class="principal" id="post">
                <p id="titulo">Bienvenido <%=usuario%></p> 

                <br>
                <%
                    if (request.getParameter("errorResul") != null) {
                        out.println(request.getParameter("errorResul"));

                    }
                %>
                <br>
                <jsp:directive.include file="articulo_tutorial.jsp"/>
            </article>
            <article class="principal" id="actividades">
                <p id="titulo">Eventos</p>                

                <div class="wrapper" id="addcurso">
                    <%
                        if (request.getParameter("error") != null) {
                            out.println(request.getParameter("error"));

                        }
                    %>
                    <div>
                        <p class="add button">
                            <a href="validafinEleccionesUL.jsp">
                                <input id="titulo" type="submit" value="Ir a Votar" />
                            </a>
                        </p>
                    </div>
                </div>

                <div id="datepicker">

                    <script>
                        $("#datepicker").datepicker();
                    </script>
                </div>
            </article>


            <footer>
                <jsp:directive.include file="footer.jsp"/>
            </footer>
        </div>
    </body>
</html>
